using System;
using System.Collections.Generic;
using System.Diagnostics;

namespace Bing
{
    /// <summary>
    /// Contains properties related to an image returned for a request to the Web <see cref="ApiHelper.SourceType"/>.
    /// </summary>
    [DebuggerDisplay("{Title}: {DisplayUrl}")]
    public class WebResult
    {

        /// <summary>
        /// Gets or sets the date and time of the last update or crawl.
        /// </summary>
        /// <value>Returns a DateTime object containing the year, month, day, hour, minute, and second components of the date and time of the last update or crawl.</value>
        public DateTime DateTime { get; set; }

        /// <summary>
        /// Gets or sets the description text of the result.
        /// </summary>
        /// <value>Returns the description text of the result.</value>
        /// <remarks>This string contains a portion of the text from the body of the HTML page that contains the specified search terms.</remarks>
        public string Description { get; set; }

        /// <summary>
        /// Gets or sets the List of <see cref="DeepLink"/> objects.
        /// </summary>
        /// <value>Returns an array of <see cref="DeepLink"/> objects.</value>
        public List<DeepLink> DeepLinks { get; set; }

        // TODO: Documentation Error: http://msdn.microsoft.com/en-us/library/dd250853.aspx, incorrect data type should be string.
        /// <summary>
        /// Gets or sets the URL string to display to the user.
        /// </summary>
        /// <value>Returns the URL string to display to the user.</value>
        /// <remarks>This string contains the URL, without instrumentation.</remarks>
        public string DisplayUrl { get; set; }

        /// <summary>
        /// Gets or sets List of search tags returned for this request.
        /// </summary>
        /// <value>The search tags.</value>
        public List<WebSearchTag> SearchTags { get; set; }

        /// <summary>
        /// Gets or sets the Title string for this <see cref="WebRequest"/>.
        /// </summary>
        /// <value>Returns the Title string for this <see cref="WebRequest"/>.</value>
        /// <remarks>The Title field contains the text specified in the HTML TITLE tag of the page.</remarks>
        public string Title { get; set; }

        /// <summary>
        /// Gets or sets the full URL for the result as a string.
        /// </summary>
        /// <value>Returns the full URL for the result as a string.</value>
        /// <remarks>
        /// The Url field contains the full URL to the page. This may contain extended information, such as instrumentation, and may be different than the DisplayUrl that you will want to display to the user. Typically, the Title is used to display the text of a hyperlink and the Url is used to specify the link target.<br />
        /// This string contains the URL to the Web page.<br />
        /// </remarks>
        public string Url { get; set;}

        /// <summary>
        /// Gets or sets the URL to the Bing cached page viewer for this result.
        /// </summary>
        /// <value>Returns the URL to the Bing cached page viewer for this result.</value>
        public string CacheUrl { get; set; }

    }
}